home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / PowerMacOberon feb96 / Text / Balloon.Text (.txt) < prev    next >
Encoding:
Oberon Text  |  1996-01-16  |  98.2 KB  |  1,852 lines  |  [TEXT/.Ob4]

  1. Syntax10.Scn.Fnt
  2. Syntax10i.Scn.Fnt
  3. KeplerElems
  4. Alloc
  5. KeplerGraphs
  6. GraphDesc
  7. KeplerGraphs
  8. StarDesc
  9. Kepler1
  10. LineDesc
  11. Kepler1
  12. AttrDesc
  13. KeplerFrames
  14. CaptionDesc
  15. Syntax10.Scn.Fnt
  16. Syntax10.Scn.Fnt
  17. Syntax10.Scn.Fnt
  18. Syntax8.Scn.Fnt
  19. Syntax8.Scn.Fnt
  20. Syntax10.Scn.Fnt
  21. Syntax8.Scn.Fnt
  22. height
  23. Syntax8.Scn.Fnt
  24. Syntax8.Scn.Fnt
  25. Times10.Scn.Fnt
  26. Courier10.Scn.Fnt
  27. KeplerGraphs
  28. GraphDesc
  29. KeplerGraphs
  30. StarDesc
  31. Kepler1
  32. RectangleDesc
  33. KeplerFrames
  34. CaptionDesc
  35. Syntax10.Scn.Fnt
  36. viewer
  37. Syntax10.Scn.Fnt
  38. Viewer
  39. Syntax10.Scn.Fnt
  40. Frame
  41. Syntax10.Scn.Fnt
  42. Frame
  43. Syntax10.Scn.Fnt
  44. Kepler1
  45. AttrDesc
  46. Syntax10.Scn.Fnt
  47. Syntax10.Scn.Fnt
  48. Syntax10.Scn.Fnt
  49. menuF
  50. Syntax10.Scn.Fnt
  51. mainF
  52. Syntax10.Scn.Fnt
  53. KeplerGraphs
  54. GraphDesc
  55. KeplerGraphs
  56. StarDesc
  57. Kepler1
  58. RectangleDesc
  59. KeplerFrames
  60. CaptionDesc
  61. Menu frame
  62. Syntax10.Scn.Fnt
  63. Main frame
  64. Syntax10.Scn.Fnt
  65. Kepler1
  66. LineDesc
  67. Kepler1
  68. AttrDesc
  69. menuH
  70. Syntax10.Scn.Fnt
  71. Syntax10.Scn.Fnt
  72. (V.X, V.Y)
  73. Syntax10.Scn.Fnt
  74. Syntax10.Scn.Fnt
  75. KeplerGraphs
  76. GraphDesc
  77. KeplerGraphs
  78. StarDesc
  79. Kepler1
  80. RectangleDesc
  81. KeplerFrames
  82. CaptionDesc
  83. Syntax10.Scn.Fnt
  84. Syntax10.Scn.Fnt
  85. F.X, F.Y
  86. Syntax10.Scn.Fnt
  87. Kepler1
  88. AttrDesc
  89. dY = 0
  90. Syntax10.Scn.Fnt
  91. Syntax10.Scn.Fnt
  92. Syntax10.Scn.Fnt
  93. KeplerGraphs
  94. GraphDesc
  95. KeplerGraphs
  96. StarDesc
  97. Kepler1
  98. RectangleDesc
  99. KeplerFrames
  100. CaptionDesc
  101. Syntax10.Scn.Fnt
  102. Syntax10.Scn.Fnt
  103. F.X, F.Y
  104. Syntax10.Scn.Fnt
  105. Kepler1
  106. AttrDesc
  107. dY > 0
  108. Syntax10.Scn.Fnt
  109. Syntax10.Scn.Fnt
  110. Syntax10.Scn.Fnt
  111. Kepler1
  112. LineDesc
  113. Syntax10.Scn.Fnt
  114. KeplerGraphs
  115. GraphDesc
  116. KeplerGraphs
  117. StarDesc
  118. Kepler1
  119. RectangleDesc
  120. KeplerFrames
  121. CaptionDesc
  122. Syntax10.Scn.Fnt
  123. Syntax10.Scn.Fnt
  124. F.X, F.Y
  125. Syntax10.Scn.Fnt
  126. Kepler1
  127. AttrDesc
  128. dY = 0
  129. Syntax10.Scn.Fnt
  130. Syntax10.Scn.Fnt
  131. Syntax10.Scn.Fnt
  132. KeplerGraphs
  133. GraphDesc
  134. KeplerGraphs
  135. StarDesc
  136. Kepler1
  137. RectangleDesc
  138. KeplerFrames
  139. CaptionDesc
  140. Syntax10.Scn.Fnt
  141. Syntax10.Scn.Fnt
  142. F.X, F.Y
  143. Syntax10.Scn.Fnt
  144. Kepler1
  145. AttrDesc
  146. dY > 0
  147. Syntax10.Scn.Fnt
  148. Syntax10.Scn.Fnt
  149. Syntax10.Scn.Fnt
  150. Kepler1
  151. LineDesc
  152. Syntax10.Scn.Fnt
  153. KeplerGraphs
  154. GraphDesc
  155. KeplerGraphs
  156. StarDesc
  157. Kepler1
  158. AttrDesc
  159. Kepler1
  160. RectangleDesc
  161. Kepler1
  162. TextureDesc
  163. KeplerFrames
  164. CaptionDesc
  165. filler viewers
  166. Syntax10.Scn.Fnt
  167. viewers
  168. Syntax10.Scn.Fnt
  169. track 1
  170. Syntax10.Scn.Fnt
  171. track 2
  172. Syntax10.Scn.Fnt
  173. TableElems
  174. Alloc
  175. Syntax10.Scn.Fnt
  176. /table
  177.     id    X    Y    W    H    state
  178. Restore display in old boundary    restore    -    -    -    -    -
  179. Change at bottom    modify    -    new Y    -    new H    -
  180. Viewer will be closed    suspend    -    -    -    -    0
  181. Viewer will be overlaid    suspend    -    -    -    -    -v.state
  182. "Dialog"
  183. The commando module of Oberon Dialogs - 
  184.     A graphical user interface for the Oberon system.
  185. "DialogFrames"
  186. This module implements dialog frames containing a dialog panel. 
  187. They can be installed in viewers.
  188. "Dialogs"
  189. A module defining the abstract class Object which is the base class of 
  190. dialog items such as button or check boxes. It also defines the class Planel 
  191. which is a collection of dialog items. Panels are shown in dialog frames. 
  192. Together with the modules Dialog and DialogFrames it defines the 
  193. package Oberon Dialogs - A grahical user interface for the Oberon system.
  194. "Directories"
  195. Module Directories provides a portable interface to directory services.
  196. "Directories.alreadyExists"
  197. Value of res if the directory already exists.
  198. "Directories.badName"
  199. Value of res if the specified file- or directory-name was bad.
  200. "Directories.delete"
  201. Value of op in the notifier procedure indicating deletion of the item.
  202. "Directories.delimiter"
  203. Character used to delimit path names.
  204. "Directories.dirInUse"
  205. Value of res if the specified directory was in use or not empty.
  206. "Directories.insert"
  207. Value of op in the notifier procedure indicating insertion of the item.
  208. "Directories.mediumFull"
  209. Value of res if the disk or directory is full.
  210. "Directories.mediumLocked"
  211. Value of res if there is a hardware or software lock and access is prohibited.
  212. "Directories.noErr"
  213. Value of res if the operation was successful.
  214. "Directories.notADir"
  215. Value of res if the specified name did not specify a directory.
  216. "Directories.otherError"
  217. Value of res if the operation was not successful and the error cannot be further specified.
  218. "Directories.Directory"
  219. Directory = POINTER TO DirectoryDesc;
  220. DirectoryDesc = RECORD path: ARRAY 128 OF CHAR END;
  221. Directory structure containing the path name of the directory.
  222. "Directories.DirectoryDesc"
  223. DirectoryDesc = RECORD path: ARRAY 128 OF CHAR END;
  224. Directory structure containing the path name of the directory.
  225. "Directories.Entry"
  226. Entry = POINTER TO EntryDesc;
  227. EntryDesc = RECORD
  228.     dir: Directory;
  229.     name: ARRAY 32 OF CHAR;
  230.     hostname: ARRAY 14 OF CHAR
  231. Data structure used to represent an entry in the directory, hostname is the name
  232. under which the Oberon-file is stored on the disk (8.3 characters). This data structure
  233. is used to perform the mapping of the file names and should not be used.
  234. "Directories.EntryDesc"
  235. EntryDesc = RECORD
  236.     dir: Directory;
  237.     name: ARRAY 32 OF CHAR;
  238.     hostname: ARRAY 14 OF CHAR
  239. Data structure used to represent an entry in the directory, hostname is the name
  240. under which the Oberon-file is stored on the disk (8.3 characters). This data structure
  241. is used to perform the mapping of the file names and should not be used.
  242. "Directories.FileProc"
  243. FileProc = PROCEDURE (d: Directory; name: ARRAY OF CHAR; isDir: BOOLEAN; 
  244.     VAR continue: BOOLEAN);
  245. Type of callback procedures for enumerating the entries in the specified directory d.
  246. name is the name of the directory entry. isDir is TRUE if the entry is a directory. 
  247. continue can be set to FALSE in order to end the enumeration process.
  248. Enumeration process is initiated by a call of Directories.Enumerate.
  249. "Directories.Notifier"
  250. Notifier = PROCEDURE (op: INTEGER; path, name: ARRAY OF CHAR);
  251. Type of callback procedures that are called when directory entries are deleted or inserted.
  252. op indicates the kind of operation (Directories.insert or Directories.delete),
  253. path and name specify the inserted or deleted entry.
  254. "Directories.PathProc"
  255. PathProc = PROCEDURE (path: ARRAY OF CHAR; VAR continue: BOOLEAN);
  256. Type of callback procedures for enumerating the search paths.
  257. path is the name of the search path.
  258. continue can be set to FALSE in order to end the enumeration process.
  259. Enumeration process is initiated by a call of Directories.EnumeratePaths.
  260. "Directories.notify"
  261. Procedure variable, is called whenever a directory entry is deleted or inserted, can be
  262. "Directories.res"
  263. Indicates the success of the last operation.
  264. "Directories.Change"
  265. PROCEDURE Change (path: ARRAY OF CHAR) changes the current working directory to 
  266. the specified directory.
  267. "Directories.Create"
  268. PROCEDURE Create (path: ARRAY OF CHAR) creates the specified directory.
  269. "Directories.Current"
  270. PROCEDURE Current (): Directory returns a directory structure denoting the 
  271. current working directory.
  272. "Directories.Delete"
  273. PROCEDURE Delete (path: ARRAY OF CHAR) deletes the specified directory.
  274. "Directories.DeleteFile"
  275. PROCEDURE DeleteFile (dir: Directory; VAR name: ARRAY OF CHAR) used to 
  276. physically delete the file name in the directory dir. Should not be used (only used in 
  277. Module Files).
  278. "Directories.Enumerate"
  279. PROCEDURE Enumerate (D: Directory; H: FileProc) calls fileProc for each entry 
  280. in the specified directory. 
  281. "Directories.EnumeratePaths"
  282. PROCEDURE EnumeratePaths (proc: PathProc) calls pathProc for each search path.
  283. "Directories.Exists"
  284. PROCEDURE Exists (dir: Directory; VAR hostname: ARRAY OF CHAR): BOOLEAN
  285. returns TRUE if the file hostname exists in the directory dir.
  286. "Directories.GetHostname"
  287. PROCEDURE GetHostname (dir: Directory; name: ARRAY OF CHAR; 
  288. VAR hostname: ARRAY OF CHAR) returns the hostname under which the file name is
  289. stored in the directory dir.
  290. "Directories.InsertEntry"
  291. PROCEDURE InsertEntry (D: Directory; e: Entry) inserts the entry e in the data structure
  292. maintained to perform the mapping of 8.3 to long file names and should not be used.
  293. "Directories.Map"
  294. PROCEDURE Map (VAR name, hostname: ARRAY OF CHAR) maps the long file name
  295. name to the hostname (8.3). Should not be used (only used in Module Files).
  296. "Directories.NextMapping"
  297. PROCEDURE NextMapping (this: ARRAY OF CHAR; VAR next: ARRAY OF CHAR) generates
  298. the next possible mapping of the long file name this to next (8.3). Should not be used (only
  299. used in Module Files). The mapping next can also already exist in the directory.
  300. "Directories.RemoveEntry"
  301. PROCEDURE RemoveEntry (D: Directory; e: Entry) removes the entry e from the data structure
  302. maintained to perform the mapping of 8.3 to long file names and should not be used.
  303. "Directories.Rename"
  304. PROCEDURE Rename (oldPath, newPath: ARRAY OF CHAR) renames the 
  305. directory oldPath to newPath.
  306. "Directories.RenameEntry"
  307. PROCEDURE RenameEntry (e: Entry; VAR new: ARRAY OF CHAR) renames the entry e
  308. in the data structure maintained to perform the mapping of 8.3 to long file names 
  309. and should not be used.
  310. "Directories.Startup"
  311. PROCEDURE Startup (): Directory returns a directory structure denoting the 
  312. current working directory.
  313. "Directories.This"
  314. PROCEDURE This (path: ARRAY OF CHAR): Directory returns a directory structure 
  315. denoting the specified directory.
  316. "Directories.ThisEntry"
  317. PROCEDURE ThisEntry (D: Directory; VAR name: ARRAY OF CHAR): Entry returns the
  318. entry corresponding to the specified long file name name within the directory D. 
  319. Should not be used (only used in Module Files).
  320. "Directories.ThisHostEntry"
  321. PROCEDURE ThisHostEntry (D: Directory; VAR hostname: ARRAY OF CHAR): Entry 
  322. returns the entry corresponding to the specified (8.3) file name hostname within the directory D.
  323. Should not be used (only used in Module Files).
  324. "Display"
  325. Module Display provides types, variables, and procedures for screen handling.
  326. "Display.black"
  327. CONST black = 0 is the background color of the screen.
  328. "Display.white"
  329. CONST white = 15 is the foreground color of the screen.
  330. "Display.invert"
  331. CONST invert = 2 is the invert mode of raster operations.
  332. "Display.paint"
  333. CONST paint = 1 is the paint mode of raster operations.
  334. "Display.replace"
  335. CONST replace = 0 is the replace mode of raster operations.
  336. "Display.Font"
  337. Font = POINTER TO Bytes is the pointer to a collection of
  338. character patterns.
  339. "Display.Byte"
  340. Byte = RECORD END
  341. "Display.Frame"
  342. Frame = POINTER TO FrameDesc
  343. "Display.FrameDesc"
  344. A rectangle input/output area on the screen.
  345. FrameDesc = RECORD
  346.     dsc, next: Frame;    (* dec: first subframe; next: next sibling frame *)
  347.     X, Y: INTEGER;    (* absolute coordinates of the lower left corner of 
  348.                                 the frame's rectangle *)
  349.     W, H: INTEGER;    (* widht and height of the frame *)
  350.     handle: Handler;    (* procedure which handles message sent to the frame *)
  351. END ;
  352. "Display.FrameMsg"
  353. FrameMsg = RECORD END is the base type of the messages
  354. which can be sent to a frame.
  355. "Display.Handler"
  356. Message interpreter to be installed in a frame.
  357. Handler = PROCEDURE (f: Frame; VAR msg: FrameMsg);
  358. "Display.Pattern"
  359. TYPE Pattern = LONGINT is a program-defined pixel map.
  360. "Display.Botton"
  361. VAR Botton: INTEGER is the bottom y coordinate of primary display.
  362. "Display.UBotton"
  363. VAR UBotton: INTEGER is the bottom y coordinate of secondary display.
  364. "Display.ColLeft"
  365. VAR ColLeft: INTEGER is the left x coordinate of color display.
  366. "Display.Left"
  367. VAR Left: INTEGER is the left x coordinate of monochrome display.
  368. "Display.Height"
  369. VAR Height: INTEGER is the height of a displayable region.
  370. "Display.Width"
  371. VAR Width: INTEGER is the width of a displayable region.
  372. "Display.Unit"
  373. VAR Unit: LONGINT is the size of a screen pixel in units of 1/36.
  374. "Display.arrow"
  375. VAR arrow: Pattern is the pattern of the mouse curser.
  376. "Display.cross"
  377. VAR cross: Pattern is the pattern of the graphic curser.
  378. "Display.downArrow"
  379. VAR downArrow: Pattern is the pattern of the busy signal.
  380. "Display.grey0"
  381. VAR grey0: Pattern is the first shade of grey.
  382. "Display.grey1"
  383. VAR grey1: Pattern is the second shade of grey.
  384. "Display.grey2"
  385. VAR grey2: Pattern is a chessboard of 2 by 2 pixel squares.
  386. "Display.hook"
  387. VAR hook: Pattern is the pattern of the caret.
  388. "Display.star"
  389. VAR star: Pattern is the pattern of the star-shaped pointer.
  390. "Display.ticks"
  391. VAR ticks: Pattern is the pattern with square lattice of 16 pixels.
  392. "Display.CopyBlock"
  393. CopyBlock (sx, sy, w, h, dx, dy, mode: INTEGER) copies a rectangle screen
  394. area (sx, sy, w, h) to an area of the same size with the lower left corner
  395. at position dx, dy. Source and destination areas may overlap.
  396. "Display.CopyBlockC"
  397. CopyBlockC (F: Frame; sx, sy, w, h, dx, dy, mode: INTEGER) is similar to
  398. CopyBlock but clip the output against frame F.
  399. "Display.CopyPattern"
  400. CopyPattern (col: INTEGER; pat: LONGINT; x, y, mode: INTEGER) copies
  401. the pattern pat to the screen such that its lower left corner has
  402. coordinates x, y. The color and mode of the copied pattern are 
  403. determined by col and mode.
  404. "Display.CopyPatterC"
  405. CopyPatternC (F: Frame; col: INTEGER; pat: LONGINT; x, y, mode: INTEGER)
  406. is similar to CopyPattern but clip the output against frame F.
  407. "Display.Dot"
  408. Dot (col, x, y, mode: INTEGER) draws a dot at the position x, y with the
  409. color col and mode mode.
  410. "Display.DotC"
  411. DotC (F: Frame; col, x, y, mode: INTEGER) is similar to Dot but clip
  412. the output against frame F.
  413. "Display.GetChar"
  414. GetChar (f: Font; ch: CHAR; VAR dx, x, y, w, h: INTEGER; VAR p: LONGINT)
  415. provides the pattern p of character ch in font f. The pattern is of minimal
  416. extent. dx denotes the distance to the next character, w and h are the
  417. width and height of the pattern and x, y represent the offset from a
  418. reference point on the base line of a text.
  419. "Display.GetColor"
  420. GetColor (col: INTEGER; VAR red, green, blue: INTEGER) returns the
  421. intensity values red, blue, green of the color number col. If col < 0,
  422. the intensities of the color used for the cursor are provided.
  423. "Display.Map"
  424. Map (x: INTEGER): LONGINT returns the base address of the pixel map
  425. containing the coordinate x.
  426. "Display.NewPattern"
  427. NewPattern (VAR image: ARRAY OF SET; w, h: INTEGER): LONGINT returns
  428. a new pattern with contents image and size w, h.
  429. "Display.ReplConst"
  430. ReplConst (col, x, y, w, h, mode: INTEGER) replicates color col over the
  431. destination x, y, w, h in the specified mode. In the case of a monochrome
  432. screen, col = 0 represents the background color whereas col > 0 maps into
  433. the inverse of the background.
  434. "Display.ReplConstC"
  435. ReplConstC (F: Frame; col, x, y, w, h, mode: INTEGER) is similar to
  436. ReplConst but clip the output against frame F.
  437. "Display.ReplPattern"
  438. ReplPattern (col: INTEGER; pat: LONGINT; x, y, w, h, mode: INTEGER)
  439. replicates the source pattern pat over the destination x, y, w, h in
  440. color and mode specified by the parameters col and mode. On a
  441. monochrome screen, col is ignored.
  442. "Display.ReplPatternC"
  443. ReplPatternC (F: Frame; col: INTEGER; pat: LONGINT; x, y, w, h, xp, yp, mode: INTEGER)
  444. is similar to ReplPattern but clip the output against frame F.
  445. "Display.SetColor"
  446. SetColor (col, red, green, blue: INTEGER) defines the hue associated
  447. with color col which is mixed from the primary colors red, green and blue.
  448. IF col < 0, the operation applies to the color in which the cursor is displayed.
  449. "Display.SetMode"
  450. SetMode (x: INTEGER; s: SET) determines the mode of operations of the
  451. screen covering coordinate x. For a monochrome screen
  452. (Left <= x < Left + Width), the control register s contains the following
  453. mode elements:
  454.     0 IN s means 'primary map is displayed'
  455.     1 IN s means 'secondary map is displayed'
  456.     2 IN s means 'display is in reverse mode'
  457. For a color screen (ColLeft <= x < ColLeft + Width), only bit 0 is available.
  458. "Display1"
  459. Module Display1 provides simple graphic routines and procedures for
  460. handling patterns.
  461. "Display1.Circle"
  462. Circle (F: Display.Frame; col, x, y, r, mode: INTEGER) draws a circle width the
  463. color col on the screen at the position x, y and radius r. mode specifies the
  464. mode of the operation. The output is clipped against frame F.
  465. "Display1.Ellipse"
  466. Ellipse (F: Display.Frame; col, x, y, a, b, mode: INTEGER) draws
  467. an ellipse with the color col on the screen at the position x, y
  468. and the radiuses a and b. mode specifies the mode of the
  469. operation. The output is clipped against frame F.
  470. "Display1.GetPatternSize"
  471. GetPatternSize (pat: LONGINT; VAR w, h: INTEGER) returns the
  472. width and height of the specified pattern pat.
  473. "Display1.Line"
  474. Line (F: Display.Frame; col, x0, y0, x1, y1, mode: INTEGER) draws
  475. a line with the color col from x0, y0 to x1, y1. mode specifies the mode
  476. of the operation. The output is clipped against frame F.
  477. "Display1.NewPattern"
  478. NewPattern (VAR image: ARRAY OF SET; w, h: INTEGER): LONGINT
  479. retruns a new pattern with the image specified in image and
  480. the width w and height h.
  481. "Display1.ThisPattern"
  482. ThisPattern (n: INTEGER): LONGINT returns the pattern which
  483. is associated with the parameter n.
  484. "Files"
  485. Module Files privides procedures to work with files (sequence of bytes
  486. stored on disk).
  487. "Files.File"
  488. A file represents a stream of bytes usually stored on an external medium. 
  489. It has a certain length as well as the date and time of its last modification.
  490. "Directory"
  491. A file directory is a mapping from file names to files. A file that is not 
  492. registered in the directory is considered temporary.
  493. "Files.Rider"
  494. TYPE Rider = RECORD eof: BOOLEAN; res: LONGINT END;
  495. A rider is a read/write position in a file (positions start with 0). There 
  496. may be multiple riders set to the same file. The field eof is set to TRUE 
  497. if an attempt was made to read beyond the end of the file. The field 
  498. res reports the success of ReadBytes and WriteBytes operations. Writing
  499. data overwrites old data at the rider position. When data is written 
  500. beyond the end of the file, the file length increases.
  501. "Files.Old"
  502. Old (fn) searches the name fn in the directory and returns the corrsponding
  503. file. If the name is not found, it returns NIL.
  504. "Files.New"
  505. New (fn) creates and returns a new file. The name fn is remembered for the
  506. later use of the operation Register. Unless Register is called, the file is not
  507. entered into the directory.
  508. "Files.Register"
  509. Register (f) enters the file f into the directory together with the name
  510. specified in the operation New that created f. The file buffers are written
  511. to the disk. Any existing mapping of this name to another file is overwritten.
  512. "Files.Close"
  513. Close (f) writes back the file buffers of f. The file is still accessible by its handle
  514. f and the riders positioned on it. Unless a file is modified it is not necessary
  515. to close it.
  516. "Files.Purge"
  517. Purge (f) resets the length of file f to 0.
  518. "Files.Delete"
  519. Delete (fn, res) removes the directory entry for the file fn without deleting the
  520. file. If res = 0 the file has been successfully deleted. If there are variables
  521. referring to the file while Delete is called, they can still be used (e.g., to 
  522. register the file again by a call to Register).
  523. "Files.Rename"
  524. Rename (oldfn, newfn, res) renames the directory entry oldfn to newfn.
  525. If res = 0 the file has been successfully renamed. If there are variables 
  526. referring to the file while Rename is called, they can still be used (e.g., to
  527. register the file under its old name again by a call to Register).
  528. "Files.Length"
  529. Length (f) returns the number of bytes in file f.
  530. "Files.GetDate"
  531. GetDate (f, t, d) returns the time t and date d of the last modification of 
  532. file f. The encoding is: hour = t DIV 4096; minute = t DIV 64 MOD 64;
  533. second = t MOD 64; year = d DIV 512; month = d DIV 32 MOD 16;
  534. day = d MOD 32.
  535. "Files.Set"
  536. Set(r, f, pos) sets the rider r to position pos in file f. The field r.eof is set
  537. to FALSE. The operation requires that 0 <= pos < Length(f).
  538. "Files.Pos"
  539. Pos(r) returns the position of the rider r.
  540. "Files.Base"
  541. Base(r) returns the file to which the rider r has been set.
  542. "Files.Read"
  543. Read(r, x) reads the next byte x from rider r and advances r accordingly.
  544. "Files.ReadInt"
  545. ReadInt(r, i) reads an integer number i from rider r and advances r
  546. accordingly.
  547. "Files.ReadLInt"
  548. ReadLInt(r, i) reads a long integer number i from rider r and advances
  549. r accordingly.
  550. "Files.ReadReal"
  551. ReadReal(r, x) reads a real number x from rider r and advances r 
  552. accordingly.
  553. "Files.ReadLReal"
  554. ReadLReal(r, x) reads a long real number x from rider r and advances
  555. r accordingly.
  556. "Files.ReadNum"
  557. ReadNum(r, i) reads an integer i from rider r and advances r
  558. accordingly. The number i is compactly encoded.
  559. "Files.ReadString"
  560. ReadString(r, s) reads a sequence of characters (including the terminating
  561. 0X) from rider r and returns it in s. The rider is advanced accordingly. The
  562. actual parameter corresponding to s must be long enough to hold the
  563. character sequence plus the terminating 0X.
  564. "Files.ReadSet"
  565. ReadSet(r, s) reads the set s from rider r and advances r accordingly.
  566. "Files.ReadBool"
  567. ReadBool(r, b) reads a Boolean value b from rider r and advances r 
  568. accordingly.
  569. "Files.ReadBytes"
  570. ReadBytes(r, buf, n) reads n bytes into buffer buf starting at the rider
  571. position r. The rider is advanced accordingly. If less than n bytes could
  572. be read, r.res contains the number of requested but unread bytes.
  573. "Files.Write"
  574. Write(r, x) writes the byte x to rider r and advances r accordingly.
  575. "Files.WriteInt"
  576. WriteInt(r, i) writes the integer number i to rider r and advances r
  577. accordingly.
  578. "Files.WriteLInt"
  579. WriteLInt(r, i) writes the long integer number i to rider r and advances
  580. r accordingly.
  581. "Files.WriteReal"
  582. WriteReal(r, x) writes the real number x to rider r and advances r 
  583. accordingly.
  584. "Files.WriteLReal"
  585. WriteLReal(r, x) writes the long real number x to rider r and advances
  586. r accordingly.
  587. "Files.WriteNum"
  588. WriteNum(r, i) writes the integer i to rider r and advances r
  589. accordingly. The number i is compactly encoded.
  590. "Files.WriteString"
  591. WriteString(r, s) writes the sequence of characters s (including the 
  592. terminating 0X) to rider r and advances r accordingly.
  593. "Files.WriteSet"
  594. WriteSet(r, s) writes the set s to rider r and advances r accordingly.
  595. "Files.WriteBool"
  596. WriteBool(r, b) writes the Boolean value b to rider r and advances r 
  597. accordingly.
  598. "Files.WriteBytes"
  599. WriteBytes(r, buf, n) writes the first n bytes from buf to rider r and
  600. advances r accordingly. r.res contains the number of bytes that could
  601. not be written (e.g., due to a disk full error).
  602. "Fonts"
  603. Module Fonts exports the abstract data type Font, which provides the
  604. raster data for screen fonts.
  605. "Fonts.Font"
  606. POINTER TO FontDesc
  607. "Fonts.FontDesc"
  608. Describes a Font.
  609. FontDesc = RECORD
  610.     name: Name;            (* name of the font *)
  611.     height: INTEGER;        (* the minimum distance between text lines *)
  612.     minX, maxX, minY, maxY: INTEGER; (* the extremal values of the box *)
  613.     raster: Display.Font    (*  the set of patterns used in porcedure Display.GetChar *)
  614. "Fonst.Name"
  615. TYPE Name: ARRAY 32 OF CHAR defines the name of the font.
  616. "Fonts.Default"
  617. VAR Default: Font contains the default font.
  618. "Fonts.This"
  619. This (name: ARRAY OF CHAR): Font returns the font with the the given name. 
  620. If the font does not exits, the default font is returned.
  621. Name convention:
  622.     FontName := family size style '.Scn.Fnt'.
  623.     family := 'Syntax' | 'Times' | 'Helvetica' | 'Geneva' | 'Palatino'
  624. | 'Courier' | ...
  625.     size := '8' | '10' | '12' | '14' | '18' | '20' | ...
  626.     style := italic | bold | plain.
  627.     italic := 'i'.
  628.     bold := 'b'.
  629.     plain := ''.
  630. Module In provides a set of basic routines for formatted input of
  631. characters, character sequences, numbers, and names. It assumes a
  632. standard input stream with a current position that can be reset.
  633. Usually the input stream is the text immediately following the most
  634. recently invoked command. If this text starts with the character ^
  635. the current position is set to the beginning of the most recent 
  636. selection (if no selection exists, Done is set to FALSE). If the text 
  637. starts with the character * the current position is set to the 
  638. beginning of the text in the marked viewer (if no viewer is marked,
  639. Done is set to FALSE). The end of the input stream is the end of the
  640. text containing the current position.
  641. "In.Done"
  642. Indicates the success of an input operation. If Done is TRUE after an 
  643. input operation, the operation was successful and its result is valid.
  644. An unsuccessful input operation sets Done to FALSE; it remains FALSE
  645. until the next call to Open or OpenText. In particular, Done is set to
  646. FALSE if an attempt is made to read beyond the end of the input stream.
  647. "In.Open"
  648. Open (re)sets the current position to the beginning of the input stream.
  649. Done indicates if the operation was successful.
  650. "In.OpenText"
  651. OpenText(t, pos) sets the current position to pos in the text t. Done
  652. indicates if the operation was successful.
  653. "In.Next"
  654. Next() returns the code of the next symbol in the input stream (inval,
  655. name, string, int, real, longReal, char) without changing the current
  656. position. It there is no next symbol, Next returns inval.
  657. "In.Char"
  658. Char(ch) returns the character ch at the current position. Char does
  659. not skip leading blanks, tabs or end-of-line characters. When called
  660. immediately after Open you usually like to skip leading blanks
  661. which is typically done in a loop.
  662. "In.Int"
  663. Int(n: INTEGER) returns the integer constant n at the current position 
  664. according to the format: IntConst = digit {digit} | digit {hexDigit} 'H'.)
  665. "In.LongInt"
  666. LongInt(n: LONGINT) returns the integer constant n at the current position 
  667. according to the format: IntConst = digit {digit} | digit {hexDigit} 'H'.)
  668. "In.Real"
  669. Real(r) returns the real constant r at the current position according to the
  670. format: RealConst = digit {digit} ['.' {digit} ['E' ('+' | '-') digit {digit}]].
  671. "In.LongReal"
  672. LongReal(r) returns the long real constant r at the current position according 
  673. to the format:
  674. LongRealConst = digit {digit} ['.' {digit} [('D' | 'E') ('+' | '-') digit {digit}]].
  675. "In.String"
  676. String(s) returns the string s at the current position according to the format:
  677. StringConst = DQ char {char} DQ. DQ is the double-quote. The string must 
  678. not contain characters less than blank.
  679. "In.Name"
  680. Name(s) returns the name s at the current position according to the file name
  681. format of the underlying Oberon system.
  682. "In.inval"
  683. inval = 0, code of the next symbol in the input stream.
  684. "In.name"
  685. name = 1, code of the next symbol in the input stream.
  686. "In.string"
  687. string = 2, code of the next symbol in the input stream.
  688. "In.int"
  689. int = 3, code of the next symbol in the input stream.
  690. "In.real"
  691. real = 4, code of the next symbol in the input stream.
  692. "In.longReal"
  693. longReal = 5, code of the next symbol in the input stream.
  694. "In.char"
  695. char = 6, code of the next symbol in the input stream.
  696. "Input"
  697. Module Input provides facilities to access the mouse,
  698. the keyboard, and the clock.
  699. "Input.TimeUnit"
  700. VAR TimeUnit-: INTEGER
  701. TimeUnit specifies the time resolution.
  702. "Input.Available"
  703. Availabel() returns the number of characters in the keyboard buffer.
  704. Keyboard buffer is a queue of characters typed in from the keyboard.
  705. "Input.Read"
  706. Read (VAR ch: CHAR) returns (and removes) the next character from
  707. the keyboard buffer. If the buffer is empty, Read waits until a key is
  708. pressed.
  709. "Input.Mouse"
  710. Mouse (VAR keys: SET; VAR x, y: INTEGER) returns the current mouse
  711. position (x, y) in pixels relative to the lower left corner of the screen.
  712. keys is the set of the currently pressed mouse keys (left key = 2, middle
  713. key = 1, right key = 0).
  714. "Input.SetMouseLimits"
  715. SetMouseLimits (w, h: INTEGER) defines the rectangle where the mouse
  716. moves (in pixels). Subsequent calls to the operation Mouse will return
  717. x coordinates in the range 0..w-1 and y coordinates in the range 0..h-1.
  718. "Input.Time"
  719. Time() returns the time elapsed since system startup in units of size
  720. 1/TimeUnit seconds.
  721. "MenuViewers"
  722. Viewers of type MenuViewers.Viewer are the standard Oberon viewers with
  723. two active subframes: menu frame and main frame.
  724. "MenuViewers.Viewer"
  725. Viewer = POINTER TO ViewerDesc;
  726. ViewerDesc = RECORD (Viewers.ViewerDesc)
  727.     menuH: INTEGER
  728. menuH is the maximal height of the menu frame.
  729. Following you see the logical frame structure and the frame geometry:
  730. The following relations hold between a menu viewer V with menu frame menuF
  731. and main frame mainF:
  732.     V IS Viewer    menuF = V.dsc    mainF = V.dsc.next
  733. The following relations hold: mainF.H + menuF.H = V.H - 2  and
  734.     mainF.W = menuF.W = V.W - 2
  735. "MenuViewers.Ancestor"
  736. Is the current menu viewer.
  737. "MenuViewers.New"
  738. New (Menu, Main: Display.Frame; menuH, X, Y: INTEGER): Viewer;
  739. Creates an instance of a menu viewer and displays it on the screen. Menu and Main
  740. are active objects (i.e., they have a handler) extending type Display.Frame which
  741. react properly to messages of type ModifyMsg. Parameter menuH designates the 
  742. height of the menu frame.
  743. The menu viewer will open such that its top edge contains the point with coordinates
  744. X, Y provided this results in a viewer of the minimal height is opened.
  745. "MenuViewers.reduce"
  746. Value of the id of a ModifyMsg in order to shrink a frame (reduce = 0). For a reduce
  747. message you have to consider two cases: If dY = 0, then the area reduces at the
  748. bottom. If dY > 0, the frame is both reduced and shifted downwards by an amount
  749. "MenuViewers.extend"
  750. Value of the id of a ModifyMsg in order to expand a frame (extend = 1). For an
  751. extend message you have to consider two cases: If dY = 0, then the area extends
  752. at the bottom. If dY > 0, the frame is both extended and shifted upwareds by an
  753. amount dY.
  754. "MenuViewers.ModifyMsg"
  755. Sent to a frame in order to change its size.
  756. ModifyMsg = RECORD (Display.FrameMsg)
  757.     id: INTEGER;    (* 0 = reduce, 1 = extend *)
  758.     dy: INTEGER;    (* dY >= 0 *)
  759.     Y, H: INTEGER
  760. dY is the translation, Y is the new value of the y coordinate of the lower left corner of
  761. the frame.
  762. H is the new height of the frame.
  763. "MenuViewers.Handle"
  764. Handle (V: Display.Frame; VAR M: Display.FrameMsg) processes the following
  765. messages: track, viewer, mark.
  766. If the track message (see Oberon.InputMsg) reports a 'shift title bar' command, the 
  767. viewer will be changed at the top.
  768. The handler adjusts the viewer in response to messages of type Viewers.ViewerMsg
  769. (restore or modify).
  770. The star-shaped pointer is set in response to a message M of type Oberon.ControlMsg
  771. with M.id = Oberon.mark.
  772. "Modules"
  773. Module Modules offers possibilites to administrate the list of modules loaded by the Oberon System.
  774. "Modules.Command"
  775. Command = PROCEDURE
  776. The type of an Oberon commando.
  777. "Modules.CommandName"
  778. The type of the name of an Oberon commando.
  779. "Modules.CommandPtr"
  780. CommandPtr = POINTER TO CommandDesc
  781. This type defines an Oberon commando with name name. 
  782. Its position in the Obj.File is determined by offset.
  783. "Modules.CommandDesc"
  784. CommandDesc = RECORD
  785.     name-: CommandName;
  786.     offset-: INTEGER;
  787. see Modules.CommandPtr
  788. "Modules.Module"
  789. Module = POINTER TO ModuleDescriptor;
  790. This type defines an Oberon module with name name. 
  791. The other properties are only for internal use and system dependent.
  792. "Modules.ModuleDescriptor"
  793. ModuleDescriptor = RECORD
  794.     name-: ModuleName;
  795.     .....  (* internal use only *)
  796. see Modules.Module
  797. "Modules.ModuleName"
  798. The type of the name of an Oberon module.
  799. "Modules.Free"
  800. Free (name: ARRAY OF CHAR; all: BOOLEAN) unloads the module with name name. 
  801. IF all then imported modules are also unloaded.
  802. "Modules.ThisCommand"
  803. ThisCommand (mod: Module"; name: ARRAY OF CHAR): Command returns the 
  804. command specified by mod and name.
  805. "Modules.ThisMod"
  806.  ThisMod (name: ARRAY OF CHAR): Module returns the module specified by name.
  807.  The module is loaded if this is not already done.
  808. "Oberon"
  809. Offers some high level functionality not really belonging to one single
  810. lowlevel module (e.g. partitioning of screen, background tasks, mouse
  811. cursor, ...).
  812. "Oberon.AllocateSystemViewer"
  813. AllocateSystemViewer (dx: INTEGER; VAR x, y: INTEGER) yields a proposal
  814. coordinates x and y to be used to open a new viewer in the system
  815. track of 
  816. the display containing dx. In most cases it is appropriate to provide
  817. Oberon.Mouse.x for dx.
  818. "Oberon.AllocateUserViewer"
  819. AllocateUserViewer (dx: INTEGER; VAR x, y: INTEGER) yields a proposal
  820. coordinates x and y to be used to open a new viewer in the user
  821. track of 
  822. the display containing dx. In most cases it is appropriate to provide
  823. Oberon.Mouse.x for dx.
  824. "Oberon.Call"
  825. Call (VAR name: ARRAY OF CHAR; par: ParList; new: BOOLEAN; VAR res: INTEGER)
  826. calls a procedure given by its name (e.g. Edit.Open). If the corresponding
  827. modules ist not in memory, it is loaded first. If new is TRUE, the system always
  828. reloads the module containing the command. In par the desired parameters
  829. for the command name can be passed. res will contain 0 if the call was
  830. successfull, otherwise an error code.
  831. "Oberon.Collect"
  832. Collect (count: INTEGER) sets the Garbage Collector counter to count. 
  833. default value is 20. It defines the number of input events between two
  834. runs of the garbage collector.
  835. "Oberon.DisplayHeight"
  836. DisplayHeight (x: INTEGER) returns the display height
  837. of the display which 
  838. contains the x-coordinate x.
  839. "Oberon.DisplayWidth"
  840. DisplayWidth (x: INTEGER) returns the display width
  841. of the display which 
  842. contains the x-coordinate x.
  843. "Oberon.DrawCursor"
  844. DrawCursor (c, m, x, y) draws the mouse cursor c at position (x, y) with
  845. the help of m.marker.Draw. If the cursor was positioned elsewhere, the
  846. old cursor is removed with m.marker.Fade. Was the cursor already visible,
  847. it is erased with help of the old marker used to draw it. 
  848. "Oberon.FadeCursor"
  849. FadeCursor (VAR c: Cursor) hides the cursor from the display.
  850. "Oberon.GetClock"
  851. GetClock (VAR t, d: LONGINT) returns the current day and time.
  852. "Oberon.GetSelection"
  853. GetSelection (VAR text: Texts.Text; VAR beg, end: LONGINT; VAR time: LONGINT)
  854. Looks for the most recent selection. It is the stretch [beg, end[ in the text
  855. text. The time when the selection has been made is returned in time. If no
  856. selection has been found, time will be less than zero.
  857. "Oberon.Install"
  858. Install (T: Task) installs a new background task
  859. to be activated if no 
  860. command is active.
  861. "Oberon.Loop"
  862. Standard Oberon loop dispatching events. Should never be called.
  863. "Oberon.MarkedViewer"
  864. MarkedViewer (): Viewers.Viewer returns the viewer
  865. currently marked with 
  866. the star shaped cursor.
  867. "Oberon.OpenCursor"
  868. OpenCursor (VAR c: Cursor) initalises a new cursor.
  869. "Oberon.OpenDisplay"
  870. OpenDisplay (UW, SW, H: INTEGER) opens a new display with two tracks with
  871. respecting widths UW (user track) and SW (system track) and the height H.
  872. "Oberon.OpenTrack"
  873. OpenTrack (x, w: INTEGER) opens a new track
  874. on display with left border x and width w.
  875. "Oberon.PassFocus"
  876. PassFocus (v: Viewers.Viewer) switchs the current focus viewer by sending
  877. a defocus message to the previous one, followed by a focus message to v.
  878. The global variable FocusViewer is set accordingly.
  879. "Oberon.Remove"
  880. Remove (T: Task) removes background task
  881. installed previously with 
  882. Oberon.Install.
  883. "Oberon.RemoveMarks"
  884. RemoveMarks (x, y, w, h: INTEGER) removes the cursor
  885. and the star if located 
  886. within the given rectangle.
  887. "Oberon.SetClock"
  888. SetClock (t, d: LONGINT) sets the current day and time.
  889. "Oberon.SetColor"
  890. SetColor (col: SHORTINT) sets color of characters read from keyboard.
  891. "Oberon.SetFont"
  892. SetFont (fnt: Fonts.Font) sets font of characters read from keyboard.
  893. "Oberon.SetOffset"
  894. SetOffset (voff: SHORTINT) sets vertical offset of characters read from keyboard.
  895. "Oberon.SetUser"
  896. SetUser (userName, password) sets the current user.
  897. "Oberon.SystemTrack"
  898. SystemTrack (x: INTEGER) : INTEGER returns the left border of
  899. the system track of the display containing the x-coordinate x.
  900. "Oberon.Time"
  901. Time (): LONGINT returns the time in units
  902. of 1/300 seconds since system 
  903. start up.
  904. "Oberon.UserTrack"
  905. UserTrack (x: INTEGER) : INTEGER returns the left border of the
  906. user track of the display containing the x-coordinate x.
  907. "Oberon.consume"
  908. id of input message if it is a keyboard input message
  909. "Oberon.track"
  910. id of input message if it is a mouse input message
  911. "Oberon.defocus"
  912. id of Oberon.ControlMsg. It is sent to a viewer
  913. when the focus is passed to another viewer.
  914. "Oberon.mark"
  915. id of Oberon.ControlMsg. Sent to the viewer under the
  916. mouse pointer after the setup key has been pressed.
  917. "Oberon.neutralize"
  918. id of Oberon.ControlMsg. Sent to all viewers
  919. after the user pressed the escape button.
  920. "Oberon.ControlMsg"
  921. Sent to a viewer if the user presses the setup button,
  922. the escape button or changes the focus viewer.
  923. ControlMsg = RECORD (Display.FrameMsg)
  924.     id: INTEGER;    (* defocus, mark or neutralize *)
  925.     X, Y: INTEGER;    (* position of mouse *)
  926. "Oberon.CopyMsg"
  927. Sent to a frame if System.Copy was activated
  928. CopyMsg = RECORD (Display.FrameMsg)
  929.     F: Display.Frame;    (* to store copy if done *)
  930. "Oberon.CopyOverMsg"
  931. Sent to the focus viewer indicating a stretch of
  932. text to be inserted at caret position.
  933. CopyOverMsg*= RECORD (Display.FrameMsg)
  934.     text*: Texts.Text;
  935.     beg*, end*: LONGINT
  936. "Oberon.Painter"
  937. Callback to draw and fade a marker (see also Oberon.Marker).
  938. Painter = PROCEDURE (x, y: INTEGER);
  939. "Oberon.Marker"
  940. Custom mouse pointer. Contains 2 callbacks to draw and fade the pointer.
  941. Marker = RECORD
  942.     Fade, Draw: Painter;
  943. END ;
  944. "Oberon.Cursor"
  945. Structure defining a cursor (e.g. mouse pointer, star).
  946. Cursor = RECORD
  947.     marker: Marker;    (* shape of cursor *)
  948.     on: BOOLEAN;    (* TRUE if drawn *)
  949.     X, Y: INTEGER;    (* current position *)
  950. "Oberon.Handler"
  951. Type for task procedures.
  952. Handler = PROCEDURE;
  953. "Oberon.InputMsg"
  954. Sent to a frame if the user made some input (mouse or keyboard).
  955. InputMsg = RECORD (Display.FrameMsg)
  956.     id: INTEGER;    (* consume for keyboard or track for mouse input *)
  957.     keys: SET;    (* set of pressed mouse buttons (2 left, 1 middle, 0 right) *)
  958.     X, Y: INTEGER;    (* mouse position *)
  959.     ch: CHAR;    (* entered key *)
  960.     fnt: Fonts.Font;    (* font of ch *)
  961.     col, voff: SHORTINT;    (* color and vertical offset of ch *)
  962. "Oberon.ParList"
  963. Pointer TO ParRec
  964. "Oberon.ParRec"
  965. Record describing the parameters for a command.
  966. ParRec = RECORD
  967.     vwr: Viewers.Viewer;    (* viewer containing parameters *)
  968.     frame: Display.Frame;    (* frame containing parameters *)
  969.     text: Texts.Text;    (* text containing parameters *)
  970.     pos: LONGINT;    (* position in text where paramters start *)
  971. END ;
  972. "Oberon.SelectionMsg"
  973. Broadcasted to all viewers to fetch newest selection. If a viewer has no
  974. current selection it has to leave to message untouched. If it has a selection,
  975. it has to check whether its selection is younger than the one contained in the 
  976. message (mySelectionTime > msg.time).
  977. SelectionMsg = RECORD (Display.FrameMsg)
  978.     time: LONGINT;
  979.     text: Texts.Text;
  980.     beg, end: LONGINT;
  981. "Oberon.Task"
  982. POINTER TO TaskDesc
  983. "Oberon.TaskDesc"
  984. Describes a background task.
  985. TaskDesc = RECORD
  986.     safe: BOOLEAN;    (* FALSE -> removed before execution and reinserted afterwards -> crash causes no problems *)
  987.     time: LONGINT;    (* time of next activation *)
  988.     handle: Handler;    (* procedure defining action of task *)
  989. "Oberon.Arrow"
  990. VAR Arrow: Marker denotes the shape of the mouse cursor.
  991. "Oberon.CurCol"
  992. VAR CurCol: SHORTINT is the color of typed in characters.
  993. "Oberon.CurFnt"
  994. VAR CurFnt: Fonts.Font is the font of typed in characters.
  995. "Oberon.CurOff"
  996. VAR CurOff: SHORTINT is the vertical offset of typed in characters.
  997. "Oberon.CurTask"
  998. VAR CurTask: Task is the currently running task. If no task is
  999. running, it contains the latest task that has been running.
  1000. "Oberon.FocusViewer"
  1001. VAR FocusViewer: Viewers.Viewer is the viewer currently having
  1002. the focus. All keyboard input is dispatched to this viewer.
  1003. "Oberon.Log"
  1004. VAR Log: Texts.Text is the text displayed in the log viewer.
  1005. "Oberon.Mouse"
  1006. VAR Mouse: Cursor is the representation of the
  1007. mouse arrow including its shape and position.
  1008. "Oberon.Par"
  1009. VAR Par: ParList is a pointer to the currently valid parameters.
  1010. "Oberon.Password"
  1011. VAR Password: LONGINT is the encoded password of the current user.
  1012. "Oberon.Pointer"
  1013. VAR Pointer: Cursor is the representation of the
  1014. star marker including its shape and position.
  1015. "Oberon.Star"
  1016. VAR Star: Marker is the shape of the star marker.
  1017. "Oberon.User"
  1018. VAR User: ARRAY 8 OF CHAR is the name of the current user.
  1019. "Out"
  1020. Module Out provides a set of basic routines for formatted output of characters,
  1021. numbers, and strings. It assumes a standard output stream to which the
  1022. symbols are written.
  1023. "Out.Open"
  1024. Open initializes the output stream. It opens an empty viewer containing the
  1025. output stream of module Out. If Open is not called, all output goes to the
  1026. Log viewer.
  1027. "Out.Close"
  1028. Close finalizes the output stream. It closes the output viewer and causes future
  1029. output to be written to the Log viewer.
  1030. "Out.Char"
  1031. Char(ch) writes the character ch to the end of the output stream.
  1032. "Out.String"
  1033. String(s) writes the null-terminated character sequence s to the end of the
  1034. output stream. Any occurrence of the character $ in s is converted to a newline
  1035. character.
  1036. "Out.Int"
  1037. Int(i, n) writes the integer number i to the end of the output stream. If the 
  1038. textual representation of it requires m characters, i is right adjusted in a field
  1039. of Max(n, m) characters padded with blanks at the left end. A positive sign is
  1040. not written.
  1041. "Out.Real"
  1042. Real(x, n) writes the real number x to the end of the output stream using an
  1043. exponential form. If the textual representation of x requires m characters
  1044. (including a two-digit signed exponent), x is right adjusted in a field of
  1045. Max(n, m) characters padded with blanks at the left end. A positive sign of
  1046. the mantissa is not written.
  1047. "Out.LongReal"
  1048. LongReal(x, n) writes the long real number x to the end of the output 
  1049. stream using an exponential form. If the textual representation of x requires 
  1050. m characters (including a three-digit signed exponent), x is right adjusted 
  1051. in a field of Max(n, m) characters padded with blanks at the left end. A 
  1052. positive sign of the mantissa is not written.
  1053. "Out.Ln"
  1054. Ln writes an end-of-line symbol to the end of the output stream.
  1055. "Out.F"
  1056. F(s, x) writes the string s to the end of the output stream as in String(s). The
  1057. first occurrence of the character # is replaced by the ordinal number x.
  1058. "Out.F2"
  1059. F2(s, x, y) behaves like F(s, x). Occurrences of the character # in s are
  1060. replaced by the ordinal numbers x and y.
  1061. "Out.F3"
  1062. F3(s, x, y, z) behaves like F(s, x). Occurrences of the character # in s are
  1063. replaced by the ordinal numbers x, y, and z.
  1064. "Out.F4"
  1065. F4(s, x, y, z, u) behaves like F(s, x). Occurrences of the character # in s are
  1066. replaced by the ordinal numbers x, y, z, and u.
  1067. "Printer"
  1068. Interface to the printer. Offers procedures for printing of text and graphics.
  1069. "Printer.Circle"
  1070. Circle (x0, y0, r: INTEGER) prints a circle on the
  1071. current page at position (x0, y0) and radius r. 
  1072. "Printer.Close"
  1073. Close ends the connection to the printer. 
  1074. "Printer.ContString"
  1075. ContString (VAR s, fname: ARRAY OF CHAR) prints the string s in font
  1076. fname starting where the latest ContString or String have ended.
  1077. "Printer.Ellipse"
  1078. Ellipse (x0, y0, a, b: INTEGER) prints an ellipse
  1079. at (x0, y0) with the radiuses a and b.
  1080. "Printer.Line"
  1081. Line (x0, y0, x1, y1: INTEGER) prints a line from (x0, y0) to (x1, y1).
  1082. "Printer.Open"
  1083. Open (VAR name, user: ARRAY OF CHAR; password: LONGINT) opens
  1084. a connection to the printer name for the user (user, password).
  1085. "Printer.Page"
  1086. Page (nofcopies: INTEGER) prints the current page nofcopies times.
  1087. "Printer.Picture"
  1088. Picture (x, y, w, h, mode: INTEGER; adr: LONGINT) prints the picture adr
  1089. at position (x, y) in the given size (w, h) and drawing mode mode.
  1090. "Printer.ReplConst"
  1091. ReplConst(x, y, w, h: INTEGER) fills the specified rectangle on the current page.
  1092. "Printer.ReplPattern"
  1093. ReplPattern (x, y, w, h, col: INTEGER) fills the specified rectangle on the
  1094. current page with the given pattern col (for patterns see also Display1).
  1095. "Printer.Spline"
  1096. Spline(x0, y0, n, open: INTEGER; VAR X, Y: ARRAY OF INTEGER) prints a spline given
  1097. by the arrays X and Y. They both contain n values. If open is 1, an open spline is 
  1098. drawn. Otherwise the spline is closed. (x0, y0) give a standard move vector
  1099. applied to all points.
  1100. "Printer.String"
  1101. String (x, y: INTEGER; VAR s: ARRAY OF CHAR; VAR fname: ARRAY OF CHAR)
  1102. prints a string s in font fname at position (x, y).
  1103. "Printer.UseColor"
  1104. UseColor (red, green, blue: INTEGER) sets color for all following print commands.
  1105. "Printer.UseListFont"
  1106. UseListFont (VAR name: ARRAY OF CHAR) assigns the global listing font to the 
  1107. font name. For all later output with font name, the standard list font is used.
  1108. "Printer.PageHeight"
  1109. VAR PageHeight: INTEGER is the height of the currently opened printer page.
  1110. "Printer.PageWidth"
  1111. VAR PageWidth: INTEGER is the width of the currently opened printer page.
  1112. "Printer.res"
  1113. VAR res: INTEGER is the error code of the latest call to Printer.Open.
  1114. "Strings"
  1115. provides frequently used string operations. Note that
  1116. string assignment and string comparison is already implemented
  1117. in the language Oberon.
  1118. "Strings.Append"
  1119. Append(s, dst) has the same effect as Insert(s, Length(s), dst).
  1120. "Strings.Cap"
  1121. Cap(s) replaces each lower case letter in s by its upper case equivalent.
  1122. "Strings.Delete"
  1123. Delete(s, pos, n) deletes n characters from s
  1124. starting at position pos (0 <= pos < Length(s)).
  1125. If n > Length(s) - pos, the new length
  1126. of s is pos.
  1127. "Strings.Extract"
  1128. Extract(src, pos, n, dst) extracts a substring dst with n characters
  1129. from position pos (0 <= pos < Length(src)) in src. If n > Length(src) - pos,
  1130. dst is only the part of src from pos to Length(src) - 1. If the size of dst
  1131. is not large enough to hold the result of the operation, the result is
  1132. truncated so that dst is always terminated with a 0X.
  1133. "Strings.Insert"
  1134. Insert(src, pos, dst) inserts the string src into the string dst
  1135. at position pos (0 <= pos <= Length(dst)). If pos = Length(dst),
  1136. src is appended to dst. If the size of dst is not large enough
  1137. to hold the result of the operation, the result is truncated
  1138. so that dst is always terminated with a 0X.
  1139. "Strings.Length"
  1140. Length(s) returns the number of characters
  1141. in s up to and excluding the first 0X.
  1142. "Strings.Pos"
  1143. Pos(pat, s, pos) returns the position of the first occurrence of
  1144. pat in s after position pos (inclusive). If pat is not found, -1 is returned.
  1145. "Strings.Replace"
  1146. Replace(src, pos, dst) has the same effect as
  1147. Delete(dst, pos, Length(src)) followed by an Insert(src, pos, dst).
  1148. "TextFrames"
  1149. Module TextFrames has two responsibilities: First, it displays text in 
  1150. a rectangular area inside a viewer supporting multiple consistent 
  1151. views on the same text. Second, it reacts to user input such as mouse 
  1152. clicks and keyboard input. TextFrames is a full text editor.
  1153. "TextFrames.MaxTabs"
  1154. The maximal number of tabulators in a parc.
  1155. "TextFrames.Unit"
  1156. Unit is used for device independent coordinates.
  1157. "Textframes.delete"
  1158. defines the operation code in a self-explanatory manner (see TextFrames.UpdateMsg).
  1159. "TextFrames.gridAdj"
  1160. gridAdj is a parc option: adjust line height to multiples of the selected line height.
  1161. "TextFrames.insert"
  1162. defines the operation code in a self-explanatory manner (see TextFrames.UpdateMsg).
  1163. "TextFrames.leftAdj"
  1164. leftAdj is a parc option: adjust paragraphs to the left
  1165. "TextFrames.mm"
  1166. mm is used for device independent coordinates.
  1167. "TextFrames.pageBreak"
  1168. pageBreak is a parc option: enforce a page break before the parc when printing.
  1169. "TextFrames.replace"
  1170. defines the operation code in a self-explanatory manner (see TextFrames.UpdateMsg).
  1171. "TextFrames.rightAdj"
  1172. rightAdj is a parc option: adjust paragraphs to the right
  1173. "TextFrames.twoColumns"
  1174. twoColumns is a parc option: format using two colums
  1175. "TextFrames.DisplayMsg"
  1176. DisplayMsg = RECORD (Texts.ElemMsg)
  1177.     prepare: BOOLEAN;
  1178.     fnt: Fonts.Font;
  1179.     col: SHORTINT;
  1180.     pos: LONGINT;
  1181.     frame: Display.Frame;
  1182.     X0, Y0: INTEGER;
  1183.     indent: LONGINT;
  1184.     elemFrame: Display.Frame;
  1185. If ~ prepare, the receiver is asked to display itself (using module Display) 
  1186. at absolute screen coordinates (X0, Y0). The text attributes set for the 
  1187. receiving element are given by fnt and col; if set, a vertical offset is 
  1188. cumulated into coordinate Y0. The field pos is the position of the 
  1189. element in the hosting text. The hosting frame is available via frame. 
  1190. Field indent is not valid when ~prepare holds. Finally, an element may 
  1191. install a subframe by creating a new frame and returning it using field elemFrame.
  1192. If prepare, the receiver is asked to prepare itself for being displayed. 
  1193. The text attributes set for the receiving element are given by fnt and 
  1194. col; if set, a vertical offset is cumulated into coordinate Y0. The field 
  1195. pos is the position of the element in the hosting text. Field indent 
  1196. indicates the space (in units) already taken in the currently casted line. 
  1197. Field Y0 is set to the base line offset that will be applied to the element. 
  1198. (This value may be changed by the element to affect the resulting base 
  1199. line offset and line heights). Fields frame, X0 and elemFrame 
  1200. are undefined if prepare holds.
  1201. "TextFrames.FocusMsg"
  1202. FocusMsg = RECORD (Texts.ElemMsg)
  1203.     focus: BOOLEAN;
  1204.     elemFrame, frame: Display.Frame
  1205. The receivers subframe is about to be focussed or defocussed, depending 
  1206. on the value of focus. The subframe is indicated by elemFrame, the host frame by frame.
  1207. "TextFrames.Frame"
  1208. Frame = POINTER TO FrameDesc
  1209. A text frame is an instance of the abstract type Frame. The text frame 
  1210. is an active frame intended to be installed either as the menu frame 
  1211. or the main frame in a menu viewer. The text frame implements the 
  1212. standard Oberon editor. Its properties are a displayed text (text and org), 
  1213. a background color (col), line spacing information (lsp), a margin 
  1214. (left, right, top, and bot), a selection (time, sel, selbeg, and selend), 
  1215. a caret (car and carloc), and a mark (mark and markH).
  1216. "TextFrames.FrameDesc"
  1217. FrameDesc = RECORD
  1218.     text: Texts.Text;
  1219.     org: LONGINT;
  1220.     col, left, right, top, bot, markH, barW: INTEGER;
  1221.     time: LONGINT;
  1222.     hasCar, hasSel, showsParcs: BOOLEAN;
  1223.     carloc, selbeg, selend: Location;
  1224.     focus: Display.Frame;
  1225. (see TextFrames.Frame)
  1226. "TextFrames.Location"
  1227. Location = RECORD
  1228.     org, pos: LONGINT;
  1229.     x, y, dx, dy: INTEGER;
  1230. The auxiliary type Location describes the place and properties of a given 
  1231. character, where org is the position in the text of the first displayed character 
  1232. in the line which contains the located character, pos is the position in the text 
  1233. of the located character, dx, dy are width and height of the located character, 
  1234. x, and y are the relative positions of the located character within the frame.
  1235. "TextFrames.InsertElemMsg"
  1236. InsertElemMsg = RECORD (Display.FrameMsg)
  1237.     e: Texts.Elem
  1238. An InsertElemMsg is sent to a frame to insert the text element e in it.
  1239. "TextFrames.NotifyMsg"
  1240. NotifyMsg = RECORD (Display.FrameMsg)
  1241.     frame: Display.Frame
  1242. A message derived from TextFrames.NotifyMsg has the additional property that 
  1243. the delegating frame adds its identity to the message field frame.
  1244. "TextFrames.Parc"
  1245. POINTER TO TextFrames.Parc
  1246. Parcs are paragraph controls. The most important properties are left (distance 
  1247. from (f.X + f.left); in units), first (first line indentantion from p.left; in units), 
  1248. width (parc width; in units), lead (distance to previous line; in units), 
  1249. lsp (line spacing of text after p; in units), dsr (descender of text after p; in units). 
  1250. "TextFrames.ParcDesc"
  1251. ParcDesc = RECORD (Texts.ElemDesc)
  1252.     left, first, width, lead, lsp, dsr: LONGINT;
  1253.     opts: SET;
  1254.     nofTabs: INTEGER;
  1255.     tab: ARRAY 32 OF LONGINT;
  1256. see TextFrames.Parc
  1257. "TextFrames.TrackMsg"
  1258. TrackMsg = RECORD (Texts.ElemMsg)
  1259.     X, Y: INTEGER;
  1260.     keys: SET;
  1261.     fnt: Fonts.Font;
  1262.     col: SHORTINT;
  1263.     pos: LONGINT;
  1264.     frame: Display.Frame;
  1265.     X0, Y0: INTEGER;
  1266. The receiving element, based at screen coordinates (X0, Y0) is asked 
  1267. to handle a mouse click at screen coordinate (X, Y) with keys pressed. 
  1268. The text attributes set for the receiving element are given by fnt and col; 
  1269. if set, a vertical offset is cumulated into coordinate Y0. The field pos is the 
  1270. position of the element in the hosting text. 
  1271. The hosting frame can be referred to via frame.
  1272. "TextFrames.UpdateMsg"
  1273. UpdateMsg = RECORD (Display.FrameMsg)
  1274.     id: INTEGER;
  1275.     text: Texts.Text;
  1276.     beg, end: LONGINT;
  1277. The update message sent by NotifyDisplay has the properties id 
  1278. (the message identifier TextFrames.replace - TextFrames.insert - 
  1279. TextFrames.delete), text (the changed text) and the stretch [beg, end) which is changed.
  1280. "TextFrames.barW"
  1281. barW is the width of the standard scroll bar.
  1282. "TextFrames.bot"
  1283. left, right, top, bot are the standard margins.
  1284. "TextFrames.defParc"
  1285. defParc is the defined Parc.
  1286. "TextFrames.left"
  1287. left, right, top, bot are the standard margins.
  1288. "TextFrames.menuH"
  1289. menuH is the standard height of the menu frame.
  1290. "TextFrames.right"
  1291. left, right, top, bot are the standard margins.
  1292. "TextFrames.top"
  1293. left, right, top, bot are the standard margins.
  1294. "TextFrames.Handle"
  1295. Handle (f: Frame; VAR msg: Display.FrameMsg) is the default  message handler 
  1296. for text frames. It is automatically installed in a frame allocated with
  1297.  TextFrames.NewText or TextFrames.NewMenu and basically reacts to resize 
  1298.  messages, input messages (mouse, keyboard) and update messages. If a new 
  1299.  handler is installed in f.handle by the user, this handler should delegate 
  1300.  all messages that it does not want to handle to procedure Handle.
  1301. "TextFrames.LocateChar"
  1302. TextFrames.LocateChar (f: Frame; x, y: INTEGER; loc: Location) retrieves the 
  1303. location loc of a char defined by its relative position x, y within the frame f.
  1304. "TextFrames.LocateLine"
  1305. TextFrames.LocateLine (f: Frame; y: INTEGER; loc: Location) retrieves the 
  1306. location loc of a line defined by its relative position y within the frame f.
  1307. "TextFrames.LocatePos"
  1308. TextFrames.LocatePos (f: Frame; pos: LONGINT; loc: Location) retrieves the 
  1309. location loc of a char defined by its relative position pos within the frame f.
  1310. "TextFrames.LocateWord"
  1311. TextFrames.LocatePos (f: Frame; x, y: INTEGER; loc: Location) retrieves the 
  1312. location loc of a word defined by its relative position x, y within the frame f.
  1313. "TextFrames.Mark"
  1314. Mark (f: Frame; mark: INTEGER) marks the text frame f specified by 
  1315. mark (mark < 0: arrow mark, mark = 0: no mark, mark > 0: position mark).
  1316. "TextFrames.NewMenu"
  1317. NewMenu (name, commands: ARRAY OF CHAR): Frame returns a new text 
  1318. frame that can be used as the menu frame of a viewer. It contains the 
  1319. viewer name n and a list of commands c. The frame is not yet displayed 
  1320. on the screen. The usual way to display it is to install it in a viewer 
  1321. using the procedure MenuViewers.New.
  1322. "TextFrames.NewText"
  1323. NewText (t: Texts.Text; pos: LONGINT): Frame returns a new text frame with 
  1324. the text t being installed so that it will be displayed starting at position pos. 
  1325. All other fields of the frame are initialized to default values. The frame is not 
  1326. yet displayed on the screen. The usual way to display it is to install it in a 
  1327. viewer using the procedure MenuViewers.New.
  1328. "TextFrames.NotifyDisplay"
  1329. NotifyDisplay (t: Texts.Text; id: INTEGER; beg, end: LONGINT) is the default 
  1330. notifier for texts. It is automatically installed in a text allocated with 
  1331. procedure Text and is called from procedures of module Texts whenever 
  1332. the text is modified. It then sends an UpdateMsg to all viewers on the 
  1333. screen. This message is handled by the handlers of those frames 
  1334. that show the modified text.
  1335. "TextFrames.Open"
  1336. Open (f: Frame; t: Texts.Text; pos: LONGINT) opens text frame f. The text t 
  1337. is linked with f and positioned such that the character with position pos 
  1338. is displayed at the top left corner of the frame.
  1339. "TextFrames.ParcBefore"
  1340. ParcBefore (t: Texts.Text; pos: LONGINT; p: Parc; beg: LONGINT) retrieves the 
  1341. parc p and its position beg responsible for position pos in text t. 
  1342. "TextFrames.Pos"
  1343. Pos (f: Frame; x, y: INTEGER) returns the text position of the character in 
  1344. frame f that corresponds to the frame coordinates x, y relative to 
  1345. the left bottom margin of f.
  1346. "TextFrames.RemoveCaret"
  1347. RemoveCaret (f: Frame) removes the caret from frame f.
  1348. "TextFrames.RemoveSelection"
  1349. RemoveSelection (f: Frame) removes the selection from frame f.
  1350. "TextFrames.SetCaret"
  1351. SetCaret (f: Frame; pos: LONGINT) sets the caret to position pos in frame f.
  1352. "TextFrames.SetSelection"
  1353. SetSelection (f: Frame; beg, end: LONGINT) sets the selection within 
  1354. frame f to the interval [beg..end[.
  1355. "TextFrames.Show"
  1356. Show (f: Frame; pos: LONGINT) scrolls the text in the already visible 
  1357. frame f such that it is shown from the position pos.
  1358. "TextFrames.Text"
  1359. Text (fn: ARRAY OF CHAR): Texts.Text returns a new text initialized 
  1360. with the contents of the file fn. If fn = '' an empty text is returned. 
  1361. Texts.NotifyDisplay is installed as a notifier of the new text.
  1362. "TextFrames.TrackCaret"
  1363. TrackCaret (f: Frame; x, y: INTEGER; keys: SET) tracks the caret in frame 
  1364. f from starting point x, y. As long as any key is pressed, the caret follows 
  1365. the mouse cursor. On release of all keys, the caret is set in place. 
  1366. Any mouse keys pressed during tracking are reported in keys.
  1367. "TextFrames.TrackLine"
  1368. TrackLine (f: Frame; x, y: INTEGER; org: LONGINT; kexs: SET) tracks lines 
  1369. in text frame f from starting point x, y. As long as any key is pressed, 
  1370. the line pointed at with the cursor is underlined. On release of all keys, 
  1371. the underlining is removed. The position of the first character of the line 
  1372. which was underlined last is returned in parameter org. Any mouse keys 
  1373. pressed during tracking are reported in keys. 
  1374. "TextFrames.TrackSelection"
  1375. TrackSelection (f: Frame; x, y: INTEGER; keys: SET) tracks the selection in text 
  1376. frame f starting at x, y. As long as any key is pressed, the selection follows 
  1377. the mouse cursor. On release of all keys, the selection is set. Any mouse keys 
  1378. pressed during tracking are reported in keys.
  1379. "TextFrames.TrackWord"
  1380. TrackWord (f: Frame; x, y: INTEGER; pos: LONGINT; keys: SET) tracks words in 
  1381. text frame f from starting point x, y. As long as any key is pressed, the word 
  1382. pointed at with the cursor is underlined. On release of all keys, the underlining 
  1383. is removed. The position of the first character of the word which was underlined 
  1384. last is returned in paramter pos. Any mouse keys pressed during 
  1385. tracking are reported in keys.
  1386. "TextPrinter"
  1387. Module TextPrinter offers procedures for printing of texts including headers on each page.
  1388. "TextPrinter.Unit"
  1389. Printer units for a 300 dpi printer.
  1390. "TextPrinter.PrintMsg"
  1391. Message sent to a text element indicating that it should print itself. If the
  1392. record filed prepare is TRUE, the element has to ensure that its record fields W and H are
  1393. set correct. IF prepare is FALSE it has to print itself at the position X0, Y0.
  1394. PrintMsg = RECORD (Texts.ElemMsg)
  1395.     prepare: BOOLEAN;
  1396.     indent: LONGINT;    (* prepare => width already consumed in line, in units *)
  1397.     fnt: Fonts.Font;    (* font which sould be used in elements containing text *)
  1398.     col: SHORTINT;    (* suggestion for printing color *)
  1399.     pos: LONGINT;    (* position of element in text *)
  1400.     X0, Y0, pno: INTEGER;    (* position on page and number of current page *)
  1401. "TextPrinter.DX"
  1402. DX (fno: SHORTINT; ch: CHAR): LONGINT returns the width dx of the
  1403. given char ch in the given font fno multiplied with TextPrinter.Unit.
  1404. "TextPrinter.Font"
  1405. Font (fno: SHORTINT): Fonts.Font returns the
  1406. font corresponding to the given font number.
  1407. "TextPrinter.FontNo"
  1408. FontNo (fnt: Fonts.Font): SHORTINT returns the number of the specified font.
  1409. "TextPrinter.Get"
  1410. Get (fno: SHORTINT; ch: CHAR; VAR dx, x, y, w, h: LONGINT) fetches the
  1411. printer dimensions of a character ch in the font fno on the printer into the
  1412. variables dx, x, y, w, h.
  1413. "TextPrinter.GetChar"
  1414. GetChar (fno: SHORTINT; targetUnit: LONGINT; ch: CHAR; VAR pdx: LONGINT;
  1415.     VAR dx, x, y, w, h: INTEGER; VAR pat: LONGINT)
  1416.     gets the metrics of a character as printed. It is not used by the system. It takes 
  1417.     the following in and out parameters:
  1418.     fno(in): Number of font (see also TextPrinter.Font)
  1419.     targetUnit(in): resolution of printer (see also TextPrinter.Unit)
  1420.     ch(in): character of interest
  1421.     pdx(out): width of character in printer units multiplied by TextPrinter.Unit
  1422.     dx(out), w(out): width of character in printer units
  1423.     x(out), y(out) offset of character in printer units
  1424.     h(out) height of character in printer units
  1425. "TextPrinter.InitFonts"
  1426. InitFonts initialises the printer fonts. Should be called before printing characters.
  1427. "TextPrinter.PlaceBody"
  1428. PlaceBody (bodyX, bodyY, bodyW, bodyH: INTEGER; T: Texts.Text; VAR pos: LONGINT;
  1429.     pno: INTEGER; place: BOOLEAN)
  1430.     prints T starting from pos on the current page. It prints until the rectangle defined 
  1431.     by bodyX, bodyY, bodyW and bodyH is filled. The first character not printed is
  1432.     returned in pos. The two additional parameters define the current page number
  1433.     (pno) and if the output should be visible (place = TRUE).
  1434. "TextPrinter.PlaceHeader"
  1435. PlaceHeader (headerX, headerY, headerW, pno: INTEGER; fnt: Fonts.Font;
  1436.     VAR header: ARRAY OF CHAR; alt: BOOLEAN)
  1437.     prints a header on the current page. headerX, headerY and headerW define the
  1438.     position of the header string header (printed in the font fnt). If alt is TRUE the
  1439.     header is printed alternatively on the left and on the right border.
  1440. "TextPrinter.PrintDraft"
  1441. PrintDraft (t: Texts.Text; header: ARRAY OF CHAR; copies: INTEGER) prints a text in 
  1442. draft mode. Every page is printed copies times. Each page has a header consisting 
  1443. of the string header and a page number.
  1444. "Texts"
  1445. Provides ASCII character streams with fonts, colors, and vertical offsets as 
  1446. well as procedures to read, write, scan, and edit them.
  1447. "Texts.Char"
  1448. Class of the scanned symbol (see Texts.Scanner). 
  1449. "Texts.ElemChar"
  1450. Class of the scanned symbol (see Texts.Scanner).
  1451. "Texts.Int"
  1452. Class of the scanned symbol (see Texts.Scanner). 
  1453. "Texts.Inval"
  1454. Class of the scanned symbo (see Texts.Scanner).
  1455. "Texts.LongReal"
  1456. Class of the scanned symbol (see Texts.Scanner).
  1457. "Texts.Name"
  1458. Class of the scanned symbol (see Texts.Scanner).
  1459. "Texts.Real"
  1460. Class of the scanned symbol (see Texts.Scanner).
  1461. "Texts.String"
  1462. Class of the scanned symbol (see Texts.Scanner).
  1463. "Texts.delete"
  1464. defines the operation code in a self-explanatory manner.
  1465. "Texts.insert"
  1466. defines the operation code in a self-explanatory manner.
  1467. "Texts.load"
  1468. possible value of Texts.FilesMsg.id.
  1469. "Texts.replace"
  1470. defines the operation code in a self-explanatory manner.
  1471. "Texts.store"
  1472. possible value of Texts.FilesMsg.id.
  1473. "Texts.Buffer"
  1474. Buffer= POINTER TO BufDesc
  1475. A buffer is an intermediate data structure holding a piece of text. It must be 
  1476. initialized with Texts.OpenBuf, it can be filled with Texts.Save or Texts.Copy, 
  1477. and it can be inserted into another text with Texts.Insert and Texts.Append. 
  1478. The component len determines the buffer length.
  1479. "Texts.BufDesc"
  1480. BufDesc = RECORD len: LONGINT END
  1481. see Texts.Buffer
  1482. "Texts.CopyMsg"
  1483. CopyMsg = RECORD (Texts.ElemMsg)
  1484.     e: Elem
  1485. A CopyMsg (extension of Texts.ElemMsg) is sent to a text element to get a 
  1486. copy of it (contained in the propery e). 
  1487. "Texts.Elem"
  1488. Elem = POINTER TO ElemDesc
  1489. The base type of a text element. Its properties are W, H (width and heigth 
  1490. of the text element) and handle (a procedure which reacts to messages of 
  1491. type Texts.ElemMsg).
  1492. "Texts.ElemDesc"
  1493. ElemDesc = RECORD
  1494.     W, H: LONGINT;
  1495.     handle: Handler;
  1496. see Texts.Elem
  1497. "Texts.ElemMsg"
  1498. ElemMsg = RECORD END 
  1499. The abstract base type of the element messages (see Texts.CopyMsg, 
  1500. Texts.FileMsg and Texts.IdentifyMsg). Each text element must react 
  1501. to such messages.
  1502. "Texts.FileMsg"
  1503. FileMsg = RECORD (ElemMsg)
  1504.     id: INTEGER;
  1505.     pos: LONGINT;
  1506.     r: Files.Rider;
  1507. A FileMsg (extension of Texts.ElemMsg) is sent to a text element to 
  1508. load (id = Texts.load or store (id = Texts.store) its state using the 
  1509. rider r. The state of the base type Texts.ElemDesc (W, H) is automatically 
  1510. loaded and stored. The field pos is the position of the element in the 
  1511. hosting text.
  1512. "Texts.Handler"
  1513. Handler = PROCEDURE (e: Elem; VAR msg: ElemMsg);
  1514. The type of the handler for text elements.
  1515. "Texts.IdentifyMsg"
  1516. IdentifyMsg = RECORD (ElemMsg)
  1517.     mod, proc: ARRAY 32 OF CHAR
  1518. An IdentifyMsg (extension of Texts.ElemMsg) is sent to a text element 
  1519. to get the name of its allocator (property mod: module, 
  1520. property proc: procedure).
  1521. "Texts.Notifier"
  1522. Notifier = PROCEDURE (t: Text; op: INTEGER; beg, end: LONGINT);
  1523. The type of text property notify.
  1524. "Texts.Reader"
  1525. Reader = RECORD
  1526.     eot: BOOLEAN;
  1527.     fnt: Fonts.Font;
  1528.     col, voff: SHORTINT;
  1529.     elem: Elem;
  1530. A reader can be used to read a text and its attributes characterwise. 
  1531. It can be set to a specific text position (Texts.OpenReader) from where 
  1532. characters can be read with the procedure Texts.Read. Procedure 
  1533. Texts.Pos returns a reader's position. The components fnt, col and 
  1534. off determines the font, color and vertical offset of the read character. 
  1535. If an element is  read the property elem is defined. When an attempt is 
  1536. made to read beyond the end of the text, the component eot is set to TRUE.
  1537. "Texts.Scanner"
  1538. Scanner = RECORD (Reader)
  1539.     nextCh: CHAR;
  1540.     line, class: INTEGER;
  1541.     i: LONGINT;
  1542.     x: REAL;
  1543.     y: LONGREAL;
  1544.     c: CHAR;
  1545.     len: SHORTINT;
  1546.     s: ARRAY 256 OF CHAR;
  1547. A scanner is an extension of a Texts.Reader. A scanner provides a convenient 
  1548. way to read symbols such as numbers, strings, or names from a text. It can 
  1549. be set to a text position (Texts.OpenScanner) from where symbols can be 
  1550. read sequentially with Texts.Scan. The fields of a scanner hold the kind of 
  1551. the recognized symbol as well as its value. Which components of the scanner 
  1552. are set, depends on the read symbol (determined by the component class).
  1553. Texts.Name (ident {'.' ident}) can be identified by len and s
  1554. Texts.String ('' {char} '') can be identified by len and s
  1555. Texts.Int (['+'|'-'] (digit {digit} | digit {hexdigit} 'H')) can be identified by i
  1556. Texts.Real (['+'|'-'] digit {digit} '.' digit {digit} ['E' ['+'|'-'] digit {digit}]) 
  1557.     can be identified by x
  1558. Texts.LongReal (['+'|'-'] digit {digit} '.' digit {digit} ['D' ['+'|'-'] digit {digit}]) 
  1559.     can be identified by y
  1560. Texts.Char (any other character) can be identified by c
  1561. Further properties of the scanner are nextCh (the character in the text which 
  1562. immediately follows a scanned symbol) and line (the line number of 
  1563. the scanned symbol).
  1564. "Texts.Text"
  1565. Texts.Text = POINTER TO Texts.TextDesc
  1566. A text is a sequence of characters with fonts, colors, and vertical offsets. 
  1567. The length of a text is only limited by the available amount of disk space. 
  1568. Character positions in a text start at 0. Whenever a text is modified, its 
  1569. notifier procedure is called which usually sends an appropriate update 
  1570. message to all frames showing this text (see TextFrames.UpdateMsg). 
  1571. Texts can be read with readers or scanners, written with writers, and 
  1572. edited with Texts.Insert, Texts.Delete and Texts.Append. Fonts, colors, and 
  1573. vertical offsets can be read with readers and modified with Texts.ChangeLooks. 
  1574. Texts can be initialized with Texts.Open or Texts.Load. To initialize a text that 
  1575. is to be displayed in a text frame, use the procedure TextFrames.Text. The 
  1576. component len determines the text length. The component notify of type 
  1577. Texts.Notifier is automatically called after every modification of this text.
  1578. "Texts.TextDesc"
  1579. TextDesc = RECORD
  1580.     len: LOGINT;
  1581.     notify: Notifier;
  1582. see Texts.Text
  1583. "Texts.Writer"
  1584. Writer = RECORD 
  1585.     buf: Buffer;
  1586.     fnt: Fonts.Font;
  1587.     col, voff: SHORTINT;
  1588. A writer represents a text buffer to which formatted output can be 
  1589. appended with the procedures Texts.Write, Texts.WriteString, etc. The writer's 
  1590. buffer buf can then be inserted into a text using Texts.Insert or Texts.Append. 
  1591. The components fnt, col and off determines the font, color and vertical offset 
  1592. of the written character.
  1593. "Texts.Append"
  1594. Append (t: Text; b: Buffer) inserts buffer b into text t at the the end of the text. 
  1595. b is emptied after this operation (identical to Texts.Insert (t, t.len, b)).
  1596. "Texts.ChangeLooks"
  1597. ChangeLooks (t: Text; beg, end: LONGINT; sel: SET; fnt: Fonts.Font; col, voff: SHORTINT) 
  1598. can be used to modify the font, color and vertical offset of the interval [beg..end[ 
  1599. of t. If (0 IN sel) the font fnt is applied, if (1 IN sel) the color col is applied, and 
  1600. if (2 IN sel) the vertical offset voff is applied.
  1601. "Texts.Close"
  1602. Close (t: Text; fn: ARRAY OF CHAR) stores the text t on the file fn. t can still be 
  1603. used after a call to Texts.Close.
  1604. "Texts.Copy"
  1605. Copy (sb, db: Buffer) appends a copy of sb to db (db must already be 
  1606. initialized with Texts.OpenBuf).
  1607. "Texts.CopyElem"
  1608. CopyElem (se, de: Elem) copies all fields - defined in the base type ElemDesc - from se to de.
  1609. "Texts.Delete"
  1610. Delete (t: Text; beg, end: LONGINT) deletes the interval [beg..end[ from t.
  1611. "Texts.ElemBase"
  1612. ElemBase (e: Elem): Text returns the base text of the text element e.
  1613. "Texts.ElemPos"
  1614. ElemPos (e: Elem): LONGINT returns the position of the text element e in 
  1615. its base text.
  1616. "Texts.Insert"
  1617. Insert (t: Text; pos: LONGINT; b: Buffer) inserts buffer b into text t at position pos. 
  1618. b is emptied after this operation.
  1619. "Texts.Load"
  1620. Load (r: Files.Rider, t: Text) reads a text from rider r and returns it in t (t must 
  1621. already be allocated with NEW).
  1622. "Texts.Open"
  1623. Open (t: Text; fn: ARRAY 32 OF CHAR) reads a text from the file fn and returns 
  1624. it in t (t must already be allocated with NEW). IF fn = '' an empty text is returned.
  1625. "Texts.OpenBuf"
  1626. OpenBuf (b: Buffer) initializes b to be empty 
  1627. (b must already be allocated with NEW).
  1628. "Texts.OpenReader"
  1629. OpenReader (r: Reader; t: Text; pos: LONGINT) sets the reader r to 
  1630. position pos in text t.
  1631. "Texts.OpenScanner"
  1632. OpenScanner (s: Scanner; t: Text; pos: LONGINT) sets the scanner s to 
  1633. position pos in text t.
  1634. "Texts.OpenWriter"
  1635. OpenWriter (w: Writer) initializes w to be empty.
  1636. "Texts.Pos"
  1637. Pos (r: Reader) returns the position of r in its associated text.
  1638. "Texts.Read"
  1639. Read (r: Reader; ch: CHAR) reads a character ch from the reader r and 
  1640. advances the reader's position by 1. r.fnt, r.col, and r.voff represent the 
  1641. font, color and vertical offset of the read character. When an attempt is 
  1642. made to read beyond the end of the text, r.eot is set to TRUE
  1643. "Texts.ReadElem"
  1644. Read (r: Reader) reads the next element r.elem from the reader r. r.fnt, 
  1645. r.col, and r.voff represent the font, color and vertical offset of the read 
  1646. character. When an attempt is made to read beyond the end of the 
  1647. text, r.eot is set to TRUE
  1648. "Texts.ReadPrevElem"
  1649. Read (r: Reader) reads the previous element r.elem from the reader r. 
  1650. r.fnt, r.col, and r.voff represent the font, color and vertical offset of the 
  1651. read character. When an attempt is made to read beyond the end 
  1652. of the text, r.eot is set to TRUE
  1653. "Texts.Recall"
  1654. Recall (b: Buffer) recalls the most recently deleted stretch of text in 
  1655. buffer b. There is no need to open the buffer prior to passing it as actual parameter.
  1656. "Texts.Save"
  1657. Save (t: Texts; beg, end: LONGINT; b: Buffer) appends a copy of the interval 
  1658. [beg..end[ of t to the buffer b (b must already be initialized with Texts.OpenBuf).
  1659. "Texts.Scan"
  1660. Scan (s: Scanner) recognizes the next symbol in the text and moves the 
  1661. scanner position at the end of this symbol. The kind of the symbol is stored 
  1662. in s.class and its value is stored according to the following list:
  1663. Texts.Name (ident {'.' ident}) can be identified by len and s
  1664. Texts.String ('' {char} '') can be identified by len and s
  1665. Texts.Int (['+'|'-'] (digit {digit} | digit {hexdigit} 'H')) can be identified by i
  1666. Texts.Real (['+'|'-'] digit {digit} '.' digit {digit} ['E' ['+'|'-'] digit {digit}]) 
  1667.     can be identified by x
  1668. Texts.LongReal (['+'|'-'] digit {digit} '.' digit {digit} ['D' ['+'|'-'] digit {digit}]) 
  1669.     can be identified by y
  1670. Texts.Char (any other character) can be identified by s.c
  1671. s.nextCh contains the character immediately following the 
  1672. recognized symbol. s.line counts the end-of-line characters from the 
  1673. position to which the scanner was set by OpenScanner.
  1674. "Texts.SetColor"
  1675. SetColor (w: Writer; col: SHORTINT) sets the color of the writer w to col.
  1676. "Texts.SetFont"
  1677. SetFont (w: Writer; fnt: Fonts.Font) sets the font of the writer w to fnt.
  1678. "Texts.SetOffset"
  1679. SetOffset (w: Writer; voff: SHORTINT) sets the vertical offset of the writer w to voff.
  1680. "Texts.Store"
  1681. Store (r: Reader; t: Text) stores the text t to rider r.
  1682. "Texts.Write"
  1683. Write (w: Writer; ch: CHAR) writes the character ch to w.
  1684. "Texts.WriteDate"
  1685. WriteDate (w: Writer; t, d: LONGINT) writes the date - defined by t and d - to w. 
  1686. The parameters t (time) and d (date) are in the format defined by the procedure 
  1687. Oberon.GetTime. The format is "dd.mm.yy hh:mm:ss" with dd: day, mm: month, 
  1688. yy: year, hh: hour, mm: minute and ss: second. 
  1689. All two digit numbers with leading zeros if necessary.
  1690. "Texts.WriteElem"
  1691. WriteElem (w: Writer; e: Elem) writes the text element e to w.
  1692. "Texts.WriteHex"
  1693. WriteHex (w: Writer; x: LONGINT) writes the integer number x as 8 hexadecimal digits to w.
  1694. "Texts.WriteInt"
  1695. WriteInt (w: Writer; x, n: LONGINT) writes the integer number  x to w. 
  1696. x is right-adjusted in a field of n characters padded with blanks. 
  1697. If n is too small, the field width is extended as necessary.
  1698. "Texts.WriteLn"
  1699. WriteLn (w: Writer) writes an end-of-line character to w.
  1700. "Texts.WriteLongReal"
  1701. WriteLongReal (w: Writer; x: LONGREAL; n: INTEGER) writes the long real 
  1702. number x to w. x is right adjusted in a field of n characters padded with 
  1703. blanks. If n is too small, the field width is extended as necessary.
  1704. "Texts.WriteLongRealHex"
  1705. WriteLongRealHex (w: Writer; x: LONGREAL) writes the long real 
  1706. number x as 8 hexadecimal digits to w.
  1707. "Texts.WriteReal"
  1708. WriteReal (w: Writer; x: REAL; n: INTEGER) writes the real number x to w. 
  1709. x is right adjusted in a field of n characters padded with blanks. 
  1710. If n is too small, the field width is extended as necessary.
  1711. "Texts.WriteRealFix"
  1712. WriteRealFix (w: Writer; x: REAL; n, k: INTEGER) writes the fixed-point 
  1713. decimal character representation of x, right justified in a field of n places 
  1714. with k places for the decimal fraction to w. 
  1715. The field size is adjusted if chosen too small.
  1716. "Texts.WriteRealHex"
  1717. WriteRealHex (w: Writer; x: REAL) writes the real number x as 8 hexadecimal digits to w.
  1718. "Texts.WriteString"
  1719. WriteString (w: Writer, s: ARRAY OF CHAR) writes the string s to w.
  1720. "Trace"
  1721. provides means for switching debugging output on or off.
  1722. "Trace.switch"
  1723. An array of boolean switches that can be set or reset by commands.
  1724. The switches can be used to control trace output.
  1725. "Trace.Clear"
  1726. resets all switches to FALSE
  1727. "Trace.Reset"
  1728. Sets the switch specified by the numeric
  1729. command argument to TRUE.
  1730. "Trace.Set"
  1731. Resets the switch specified by the numeric
  1732. command argument to FALSE.
  1733. "Trace.Show"
  1734. lists all switches that are TRUE
  1735. "Types"
  1736. Module Types offers possibilites to administrate the list of defined Types. 
  1737. It works with type SYSTEM.PTR. Variables of any pointer type may be 
  1738. assigned to variables of this type.
  1739. "Types.Type"
  1740. Type = POINTER TO TypeDesc
  1741. This type defines an Oberon Type defined in module module with name name.
  1742. "Types.TypeDesc"
  1743. TypeDesc = RECORD
  1744.     name: ARRAY 32 OF CHAR;
  1745.     module: Modules.Module;
  1746. see Types.Type
  1747. "Types.BaseOf"
  1748. BaseOf (t: Type; level: INTEGER): Type returns the base type t with the 
  1749. extension level level. If level = 0 the base type is returned.
  1750. "Types.LevelOf"
  1751. LevelOf (t: Type): INTEGER returns the extension level of type t.
  1752. "Types.NewObj"
  1753. NewObj (VAR o: SYSTEM.PTR; t: Type) allocates a new object of type t and retrieves it in o.
  1754. "Types.This"
  1755. This (mod: Modules.Module; name: ARRAY OF CHAR): Type returns 
  1756. the type with name name defined in module mod. 
  1757. "Types.TypeOf"
  1758. TypeOf (o: SYSTEM.PTR): Type returns the dynamic type of of o.
  1759. "Viewers"
  1760. Module Viewers provides a logical model of the display with tracks
  1761. (vertical stripes) and viewers (windows). Viewers completely tile
  1762. the display.
  1763. "Viewers.restore"
  1764. id of a ViewerMsg. Causes viewer to be restored within
  1765. its boundaries (X, Y, W, H).
  1766. "Viewers.modify"
  1767. id of a ViewerMsg. Causes the viewer to change its bottom.
  1768. "Viewers.suspend"
  1769. id of a ViewerMsg. Sent when a viewer is closed
  1770. or overlaid.
  1771. "Viewers.Viewer"
  1772. POINTER TO RECORD (Display.FrameDesc)
  1773.     state: INTEGER
  1774. state > 1:   viewer is displayed (not a filler)
  1775. state = 1:   viewer is a filler
  1776. state = 0:   viewer is closed
  1777. state = -1: viewer is a suspended filler
  1778. state < -1: viewer is suspended (not a filler)
  1779. "Viewers.ViewerMsg"
  1780. RECORD (Display.FrameMsg)
  1781.     id, X, Y, W, H, state: INTEGER
  1782. Sent when the display configuration changes.
  1783. "Viewers.minH"
  1784. Minimal viewer height.
  1785. "Viewers.curW"
  1786. width of logical display (sum of all track widths).
  1787. "Viewers.Broadcast"
  1788. Broadcast(m) sends the message m to all visible viewers on the screen.
  1789. "Viewers.Change"
  1790. Change(v, y) moves the top of v to y (if the new viewer height
  1791. is greater than minH) and sends the viewer above v a modify
  1792. message.
  1793. "Viewers.Close"
  1794. Close(v) closes viewer v. If v is the last viewer in a track (besides the
  1795. filler), the track is closed, too.
  1796. "Viewers.CloseTrack"
  1797. CloseTrack(x) closes the track that contains x (only if it is an overlay).
  1798. "Viewers.InitTrack"
  1799. InitTrack(w, h, filler) adds a new track to the right of the
  1800. existing tracks. Used during system initialization.
  1801. "Viewers.Locate"
  1802. see the User Guide.
  1803. "Viewers.Next"
  1804. Next(v) returns the viewer above v. The topmost viewer of a track
  1805. is a filler (v.state = 1).
  1806. "Viewers.Open"
  1807. Open(v, x, y) opens viewer v so that the point (x, y) determines the top
  1808. of the viewer (if the viewer is not smaller than minH). The viewer above
  1809. v is sent an update message. Open does not display the frames in v.
  1810. "Viewers.OpenTrack"
  1811. OpenTrack(x, w, filler) creates an overlay track that covers all tracks
  1812. overlapping with the line (x, x+w). Overlayed viewers are suspended.
  1813. "Viewers.Recall"
  1814. Recall(v) returns the last viewer previously closed by Close(v) or NIL
  1815. if no such viewer exists.
  1816. "Viewers.This"
  1817. This(x, y) returns the viewer containing the point (x, y)
  1818. "XYPlane"
  1819. Offers a primitive pixel based output mechanism. Useful
  1820. mostly for demonstrations and student exercises.
  1821. "XYPlane.Open"
  1822. Opens a viewer and initializes the drawing plane. The position and dimension
  1823. of the opened viewer is stored in the global variables X, Y, W and H.
  1824. "XYPlane.Clear"
  1825. Clears the drawing plane opened with Open.
  1826. "XYPlane.Dot"
  1827. Dot (x, y, mode) draws the dot at position (x, y).
  1828. mode may be either draw 
  1829. or erase.
  1830. "XYPlane.IsDot"
  1831. IsDot (x, y: INTEGER): BOOLEAN returns TRUE if the
  1832. dot at position (x, y) 
  1833. is drawn; otherwise FALSE.
  1834. "XYPlane.Key"
  1835. Key (): CHAR reads the keyboard. If, previous to invocation, a key has been
  1836. pressed, its character value is returned. Otherwise the result is 0X.
  1837. "XYPlane.draw"
  1838. Drawing mode for the procedure Dot.
  1839. "XYPlane.erase"
  1840. Drawing mode for the procedure Dot.
  1841. "XYPlane.H"
  1842. Height of drawing plane.
  1843. "XYPlane.W"
  1844. Width of drawing plane.
  1845. "XYPlane.X"
  1846. Left offset of drawing plane.
  1847. "XYPlane.Y"
  1848. Bottom offset of drawing plane.
  1849. "XYPlane.XYhandle"
  1850. XYhandle (F: Display.Frame; VAR M: Display.FrameMsg)
  1851. handle of the drawing plane frame.
  1852.